package com.niiwoo.civet.trade.enums;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ProjectLifeCycleEnum {

    USER_APPLY((byte)1,"用户申请标的"),
    RISK_MANAGEMENT_BEGIN((byte)2,"风控模型-开始"),
    RISK_MANAGEMENT_END((byte)3,"风控模型-结束"),
    WORK_TRIAL((byte)4,"工作分配-初审"),
    WORK_TRIAL_BEGIN((byte)5,"初审-开始"),
    FINAL_JUDGMENT((byte)6,"工作分配-终审"),
    FINAL_JUDGMENT_BEGIN((byte)7," 终审-开始"),
    TRANSFER((byte)8,"工作分配-转交"),
    REBACK_TRIAL((byte)9,"打回初审"),
    INVESTMENT_BEGIN((byte)10,"投资-开始"),
    INVESTMENT_FULL((byte)11,"投资-满标"),
    INVESTMENT_FULL_LOAN((byte)12,"放款"),
    REPAYMENT_BEGIN((byte)13,"还款周期-开始"),
    REPAYMENT((byte)14,"正常还款"),
    OVERDUE((byte)15,"逾期"),
    OVERDUE_REPAYMENT((byte)16,"逾期还款"),
    PART_REPAYMENT((byte)17,"部分还款"),
    REPAYMENT_END((byte)18,"还款周期-结束"),
    LOSE_PROJECT((byte)19,"流标"),


    WORK_TRIAL_FAST((byte)20,"工作分配"),
    TRIAL_BEGIN_FAST((byte)21,"审核-开始"),
    SERIOUS_OVERDUE((byte)22,"严重逾期")
    ;


    private Byte type;
    private String desc;

    public static String enumOf(Byte type) {
        for (ProjectLifeCycleEnum typeEnum : values()) {
            if (typeEnum.type.equals(type)) {
                return typeEnum.desc;
            }
        }
        throw new NoSuchEnumValueException("ContactsCallRecordTypeEnum:" + type);
    }

    public enum LoseProjectEnum{

    }
}
